MutableSet

interface MutableSet<E> : Set<E> , MutableCollection<E>

A generic unordered collection of elements that does not support duplicate elements, and supports adding and removing elements.

Parameters

E

the type of elements contained in the set. The mutable set is invariant in its element type.

Functions

add
Link copied to clipboard
abstract override fun add(element: E): Boolean

Adds the specified element to the set.

addAll
Link copied to clipboard
abstract override fun addAll(elements: Collection<E>): Boolean
clear
Link copied to clipboard
abstract override fun clear()
contains
Link copied to clipboard
abstract operator override fun contains(element: E): Boolean
containsAll
Link copied to clipboard
abstract override fun containsAll(elements: Collection<E>): Boolean
isEmpty
Link copied to clipboard
abstract override fun isEmpty(): Boolean
iterator
Link copied to clipboard
abstract operator override fun iterator(): MutableIterator<E>
remove
Link copied to clipboard
abstract override fun remove(element: E): Boolean
removeAll
Link copied to clipboard
abstract override fun removeAll(elements: Collection<E>): Boolean
retainAll
Link copied to clipboard
abstract override fun retainAll(elements: Collection<E>): Boolean

Properties

size
Link copied to clipboard
abstract override val size: Int

Inheritors

AbstractMutableSet
Link copied to clipboard
HashSet
Link copied to clipboard
LinkedHashSet
Link copied to clipboard